using System;
using System.Collections.Generic;
using System.Text;
using System.Reflection;

namespace Curchy.PERTToolbox.Service.Async
{
    public class AsyncToolbox
    {
        public static void StartAsyncProcess()
        {
            foreach (Type t in Assembly.GetExecutingAssembly().GetTypes())
            {
                if (t.BaseType == typeof(AsyncBase))
                {
                    PropertyInfo pi = t.GetProperty("Instance");
                    AsyncBase ab = (AsyncBase)pi.GetGetMethod().Invoke(t, new object[0]);
                    ab.Start();
                }
            }
        }
    }
}
